1. Field of the Invention
The present invention relates to a video processing and particularly relates to an intra-frame prediction method for realizing every kind of intra-frame prediction algorithm and an apparatus thereof.
2. Description of Related Art
Intra-frame prediction is one technique adopted in video encoding and decoding standards H.264 and AVS. The technique utilizes pixel surrounding a block to obtain values of the block. It is to say, intra-frame prediction can enhance encoding efficiency. Generally, in high definition (such as 1920×1088) H.264 or AVS application, a special hardware, such as acceleration electronic circuit, is required for practicing intra-frame prediction.
Take H.264 video encoding and decoding standard as an example, its intra-frame prediction has two types, one is luminance prediction and the other is chrominance prediction. Luminance prediction of the standard has three different prediction blocks, which are—4×4 size, 8×8 size, and 16×16 size. More detail, there are 9 prediction modes for a 4×4 block, 9 prediction modes for a 8×8 block, and 4 prediction modes for a 16×16 block. The way for predicting a 4×4 block is similar to a 8×8 block, but the predicting the 8×8 block may use more surrounding pixel. In addition, 16 pixels can once be obtained in practicing a 4×4 block prediction, and more than 16 pixels (maybe 64 pixels) can be gained in an 8×8 block prediction. Chrominance prediction of H.264 video encoding and decoding standard is practiced based on—a 4×4 size block; and it has 4 prediction modes.
Furthermore, take AVS video encoding and decoding standard as another example, it has only one prediction block, which is 8×8 size. There are 5 prediction modes for practicing luminance prediction, and 4 prediction modes for executing chrominance prediction.
A conventional method for realizing high definition application of H.264 and AVS is to place a special electronic circuit for each prediction mode. For example, for H.264 standard, a 4×4 block may need 9 dedicated circuits for the 9 prediction modes. It can be anticipated that at least twenty-two dedicated circuits are required if all prediction modes are provided for practicing H.264 standard. In a worse case, assume both H.264 standard and AVS standard are supported, it requires at least 31 circuits. From what has been discussed above, the conventional art consumes hardware resources. Sometimes, the conventional art can hardly meet a real-time decoding requirement.